import unittest,requests
from Rk_2211A.rk_526.excel import excel
path = r'C:\Users\86155\PycharmProjects\untitled\Rk_2211A\rk_526\login.xlsx'
sheetname = 'Sheet1'
excel = excel(path, sheetname)
from ddt import ddt, file_data, unpack


@ddt()
class login_a3mall(unittest.TestCase):
    @file_data(*excel.getdatafromexcel())
    @unpack
    def test_login(self, case_id, case_qz, case_title, case_b_v1, case_b_v2, case_exp):
        print(case_id +'***---***'+case_qz)
        print(case_title)
        login = requests.post(
            url='http://10.59.9.14:7003/api/public/login',
            json={"username":case_b_v1,"password":case_b_v2}
        )
        print(login.json())
        print(case_exp)